package cn.xuexiyuan.springstudy.core.demo03.config;

import cn.xuexiyuan.springstudy.core.demo03.entity.Computer;
import cn.xuexiyuan.springstudy.core.demo03.entity.Phone;
import cn.xuexiyuan.springstudy.core.demo03.entity.AbstractProduct;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ShopConfiguration {

    @Bean
    public AbstractProduct phone(){
        return new Phone("苹果 plus", 6666.66f);
    }

    @Bean
    public AbstractProduct computer(){
        return new Computer("华为", 5000);
    }
}
